package com.salesmanager.core.business.category.service;


import com.salesmanager.core.business.category.model.Category;
import com.salesmanager.core.business.category.model.CategoryCriteria;
import com.salesmanager.core.business.generic.exception.ServiceException;
import com.salesmanager.core.business.generic.service.SalesManagerEntityService;

import java.util.List;
import java.util.Map;

public interface CategoryService extends SalesManagerEntityService<Long, Category> {

    List<Category> list(CategoryCriteria criteria) throws ServiceException;

	List<Category> listByDepth(int depth);

	Category getByCode(String code) throws ServiceException;

    void saveOrUpdate(Category category) throws ServiceException;

    void addChild(Category parent, Category child) throws ServiceException;

    List<Category> listByParentId(long parentId);


}
